<div id="field_edit_div" class="app-toolbar-content" data-id="<?php if (isset($userField->Id)) {
    echo $userField->Id;
} else {
    echo '0';
} ?>">
    <?php
    if (isset($userField) && isset ($userField->Id)) // 如果为修改本领
    {
        $btn_text = '加入购物车';
        $btn_script1 = 'field_edit_modal(2,1)'; // 本领名称修改 加入购物车
        $btn_script2 = 'field_edit_modal(2,2)'; //本领简介修改 加入购物车
        //$tittle_l_script = '';
        $tittle_l_text = '列表';
    } else //如果为添加本领
    {
        $btn_text = '确定';
        $btn_script1 = 'field_edit_modal(1,1)';
        $btn_script2 = 'field_edit_modal(1,2)';
    }
    require("{$CfgPara->root}/view/tittle_back_bar_blue.app.v.php");
    ?>
    <div class="app-border-bottom"
         style="width: 100%; padding: 15px 20px"
         onclick="field_edit_modal(0,1)">
        <?php if (isset($userField->FieldName2)) { ?>
            <span class="am-icon-pencil app-gray-color" style="position: absolute; right: 20px; width: 15px"></span>
        <?php } ?>
        <div class="am-fl" style="width: 50px; ">
            本领：
        </div>
        <div data-id="<?php if (isset ($userField->Id)) echo $userField->Id ?>" class="app-gray-color"
             id="user_field_name" style="overflow: hidden"><?php
            if (!empty($userField->FieldName2)) {
                echo $userField->FieldName2;
            } else {
                echo '点击输入';
            }
            ?></div>
    </div>
    <div
            style="width: 100%; padding: 15px 20px"
            onclick="field_edit_modal(0,2)">
        <?php if (isset($userField->FieldIntrod2)) { ?>
            <span class="am-icon-pencil app-gray-color" style="position: absolute; right: 20px;; width: 15px"></span>
        <?php } ?>
        <div class="am-fl" style="width: 50px; ">
            简介：
        </div>
        <div data-id="<?php if (isset ($userField->Id)) echo $userField->Id ?>" class="app-gray-color"
             id="user_field_introd" style="overflow: hidden"><?php
            if (!empty($userField->FieldIntrod2)) {
                echo $userField->FieldIntrod2;
            } else {
                echo '点击输入';
            }
            ?></div>
    </div>

    <div class="am-modal am-modal-no-btn" tabindex="-1" id="modal_user_field_name">
        <div class="am-modal-dialog"
             style="padding: 40px 20px 20px 20px; background-color: white; border: 1px solid #dedede;">
            <input id="field_input_name" type="text"
                   style="border-radius: 5px; border: 1px solid #dedede; padding: 5px; width: 100%"
                   placeholder="点击输入" value="">
            <div class="am-g" style="margin-top: 50px">
                <div class="am-u-sm-6" style="padding-left: 0">
                    <button class="am-btn app-gray-color am-btn-sm"
                            style="border-radius: 5px;width: 100%; background-color: white; border-color: #dedede"
                            onclick="field_edit_modal(-1,1)">
                        取消
                    </button>
                </div>
                <div class="am-u-sm-6" style="padding-right: 0">
                    <button class="am-btn am-btn-sm app-white-color"
                            style="border-radius: 5px; width: 100%; background-color: #ffa726"
                            onclick="<?= $btn_script1 ?>">
                        <?= $btn_text ?>
                    </button>
                </div>
            </div>
        </div>
    </div>

    <div class="am-modal am-modal-no-btn" tabindex="-1" id="modal_user_field_introd">
        <div class="am-modal-dialog"
             style="padding: 40px 20px 20px 20px; background-color: white; border: 1px solid #dedede;">
        <textarea id="field_input_introd" rows="10"
                  style="border-radius: 5px; border: 1px solid #dedede; padding: 5px; width: 100%"
                  placeholder="点击输入"
        ></textarea>

            <div class="app-gray-color"
                 style="position: absolute; left: 30px; bottom: 80px;"
                 onclick="field_introd_restore()">
                恢复
            </div>
            <div class="app-gray-color" style="position: absolute; right: 30px; bottom: 80px;">
                <span id="field_introd_count">0</span>/128
            </div>

            <div class="am-g" style="margin-top: 20px">
                <div class="am-u-sm-6" style="padding-left: 0">
                    <button class="am-btn app-gray-color am-btn-sm"
                            style="border-radius: 5px;width: 100%; background-color: white; border-color: #dedede"
                            onclick="field_edit_modal(-1,2)">
                        取消
                    </button>
                </div>
                <div class="am-u-sm-6" style="padding-right: 0">
                    <button class="am-btn am-btn-sm app-white-color"
                            style="border-radius: 5px; width: 100%; background-color: #ffa726"
                            onclick="<?= $btn_script2 ?>">
                        <?= $btn_text ?>
                    </button>
                </div>
            </div>
        </div>
    </div>
    <?php
    if (isset($userField) && isset ($userField->Id)) // 如果为修改本领
    {
        // 添加作品列表
        $InputData['list_type'] = work_m::ListUserField;
        $InputData['user_field_id'] = $userField->Id;
        require("{$CfgPara->root}/view/user_field_work_list_show.app.v.php");
        // 添加本领管理底部栏
        $fieldManageType = "2,{$userField->Id}";
        $fieldManageType2 = "12,{$userField->Id}";
        require("{$CfgPara->root}/view/user_field_manage_bar.app.v.php");
    } else //为添加本领
    {
        require_once("{$CfgPara->root}/class/pay.class.php");
        // 添加购物车底部栏
        $pay_car_add_price = CPay::GoodsPrice_FieldAdd;
        $pay_car_add_good = CPay::GoodsType_FieldAdd;
        $pay_car_add_unit = CPay::GoodsPrice_FieldAdd;
        require("{$CfgPara->root}/view/user_pay_car_add.app.v.php");
    }
    ?>
    <div style="height:37px"></div>
</div>
<script type="text/javascript">
    //toolbar_ini("field_edit_div", "field_edit_toolbar");
    stat_input_num($('#field_input_introd'), $('#field_introd_count'), 128);
</script>
